import { AxiosInstance } from "./types";
import { Axios } from "./Axios";
import { CancelTokenStatic ,isCancel} from "./CancelToken";

function createInstance() {
  const content = new Axios();
  let  instance = Axios.prototype.request.bind(content);
  // content.interceptors.request.use
  // content.interceptors.response.use
  instance=Object.assign(instance,content)
  return instance as AxiosInstance;
}
const axios=createInstance()
//需要将编写好的
axios.CancelToken=new CancelTokenStatic
axios.isCancel=isCancel
export default axios;
export * from "./types";
